package com.ntes.consumer2.service.impl;

import com.ntes.consumer2.service.IDemoService;
import com.ntes.model.User;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * Created by bjliuyue1 on 2017/5/21.
 */
@Service
public class DemoServiceFallBack implements IDemoService {
    @Override
    public String getString(@RequestParam("name") String name) {
        return name + " fallback getString";
    }

    @Override
    public User getUser(@RequestParam("name") String username) {
        User user = new User();
        user.setAge(-1);
        user.setPort(-1);
        user.setName("default fallback");
        return user;
    }
}
